#include <stdio.h>

int square(volatile int *ptr)
{
	return *ptr * *ptr;
}

int square_compile(volatile int *ptr)
{
	int a, b;
	a = *ptr;
	b = *ptr;
	
	return a * b;
}

int square_modify(volatile int *ptr)
{
	int a;
	a = *ptr;
	
	return a * a;
}

int main()
{
	int a = 3;
	int b;
	
	b = square(&a);
	printf("%d\n", b);
	
	b = square_compile(&a);
	printf("%d\n", b);
	
	b = square_modify(&a);
	printf("%d\n", b);
	
	return 0;
}

